import Koa from 'koa'

import { sync1 } from "./component/db/index.js"
import { useRouter } from './component/router/index.js'
import cors  from '@koa/cors'
sync1()
let app = new Koa()

// app.use(ctx => ctx.request.query)
app.use(cors())
useRouter(app)

app.listen(3000, () => console.log('http://localhost:3000'))